package main

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

func inorderTraversal(root *TreeNode) []int {
	var arr = []int{}
	var inorder func(node *TreeNode)
	inorder = func(node *TreeNode) {
		if node != nil {
			inorder(node.Left)
			arr = append(arr, node.Val)
			inorder(node.Right)
		}
		return
	}
	inorder(root)
	return arr
}
func main() {

}
